package aos.ydksxt.dao;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * Created by Stiofan on 2017/3/7.
 */
@Entity
@Table(name = "CS_BD_BDDY")
public class CsBdBddy {
    private String uuid;
    private String bddyUuid;
    private String dymc;
    private String dyjb;
    private BigDecimal xssx;
    private String lrrDm;
    private Timestamp lrrq;
    private String xgrDm;
    private Timestamp xgrq;
    private String sjly;

    @Id
    @Column(name = "UUID", nullable = false, length = 32)
    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    @Basic
    @Column(name = "BDDY_UUID", nullable = true, length = 32)
    public String getBddyUuid() {
        return bddyUuid;
    }

    public void setBddyUuid(String bddyUuid) {
        this.bddyUuid = bddyUuid;
    }

    @Basic
    @Column(name = "DYMC", nullable = true, length = 30)
    public String getDymc() {
        return dymc;
    }

    public void setDymc(String dymc) {
        this.dymc = dymc;
    }

    @Basic
    @Column(name = "DYJB", nullable = true)
    public String getDyjb() {
        return dyjb;
    }

    public void setDyjb(String dyjb) {
        this.dyjb = dyjb;
    }

    @Basic
    @Column(name = "XSSX", nullable = true, precision = 0)
    public BigDecimal getXssx() {
        return xssx;
    }

    public void setXssx(BigDecimal xssx) {
        this.xssx = xssx;
    }

    @Basic
    @Column(name = "LRR_DM", nullable = true, length = 11)
    public String getLrrDm() {
        return lrrDm;
    }

    public void setLrrDm(String lrrDm) {
        this.lrrDm = lrrDm;
    }

    @Basic
    @Column(name = "LRRQ", nullable = true)
    public Timestamp getLrrq() {
        return lrrq;
    }

    public void setLrrq(Timestamp lrrq) {
        this.lrrq = lrrq;
    }

    @Basic
    @Column(name = "XGR_DM", nullable = true, length = 11)
    public String getXgrDm() {
        return xgrDm;
    }

    public void setXgrDm(String xgrDm) {
        this.xgrDm = xgrDm;
    }

    @Basic
    @Column(name = "XGRQ", nullable = true)
    public Timestamp getXgrq() {
        return xgrq;
    }

    public void setXgrq(Timestamp xgrq) {
        this.xgrq = xgrq;
    }

    @Basic
    @Column(name = "SJLY", nullable = true, length = 30)
    public String getSjly() {
        return sjly;
    }

    public void setSjly(String sjly) {
        this.sjly = sjly;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CsBdBddy csBdBddy = (CsBdBddy) o;

        if (uuid != null ? !uuid.equals(csBdBddy.uuid) : csBdBddy.uuid != null) return false;
        if (bddyUuid != null ? !bddyUuid.equals(csBdBddy.bddyUuid) : csBdBddy.bddyUuid != null) return false;
        if (dymc != null ? !dymc.equals(csBdBddy.dymc) : csBdBddy.dymc != null) return false;
        if (dyjb != null ? !dyjb.equals(csBdBddy.dyjb) : csBdBddy.dyjb != null) return false;
        if (xssx != null ? !xssx.equals(csBdBddy.xssx) : csBdBddy.xssx != null) return false;
        if (lrrDm != null ? !lrrDm.equals(csBdBddy.lrrDm) : csBdBddy.lrrDm != null) return false;
        if (lrrq != null ? !lrrq.equals(csBdBddy.lrrq) : csBdBddy.lrrq != null) return false;
        if (xgrDm != null ? !xgrDm.equals(csBdBddy.xgrDm) : csBdBddy.xgrDm != null) return false;
        if (xgrq != null ? !xgrq.equals(csBdBddy.xgrq) : csBdBddy.xgrq != null) return false;
        if (sjly != null ? !sjly.equals(csBdBddy.sjly) : csBdBddy.sjly != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = uuid != null ? uuid.hashCode() : 0;
        result = 31 * result + (bddyUuid != null ? bddyUuid.hashCode() : 0);
        result = 31 * result + (dymc != null ? dymc.hashCode() : 0);
        result = 31 * result + (dyjb != null ? dyjb.hashCode() : 0);
        result = 31 * result + (xssx != null ? xssx.hashCode() : 0);
        result = 31 * result + (lrrDm != null ? lrrDm.hashCode() : 0);
        result = 31 * result + (lrrq != null ? lrrq.hashCode() : 0);
        result = 31 * result + (xgrDm != null ? xgrDm.hashCode() : 0);
        result = 31 * result + (xgrq != null ? xgrq.hashCode() : 0);
        result = 31 * result + (sjly != null ? sjly.hashCode() : 0);
        return result;
    }
}
